package org.opengoofy.index12306.biz.userservice.toolkit;

import static org.opengoofy.index12306.biz.userservice.common.constant.Index12306Constant.USER_REGISTER_REUSE_SHARDING_COUNT;

/**
 * @author ling007
 * @date 2024/5/30 14:46
 * @desciption: 用户名可复用工具类
 */
public final class UserReuseUtil {

    public static int hashShardingIdx(String username) {
        return Math.abs(username.hashCode() % USER_REGISTER_REUSE_SHARDING_COUNT);
    }
}
